/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package warmachineroster.presentation;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.ui.EclipseUIPlugin;
import org.eclipse.emf.common.util.ResourceLocator;

import warmachinesystem.provider.WarmachineSystemEditPlugin;

/**
 * This is the central singleton for the WarmachineRoster editor plugin.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public final class WarmachineRosterEditorPlugin extends EMFPlugin {
	/**
	 * Keep track of the singleton.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final WarmachineRosterEditorPlugin INSTANCE = new WarmachineRosterEditorPlugin();

	/**
	 * @generated NOT
	 */
	public static final String PLUGIN_ID = "WarmaBuilder.editor";
	
	/**
	 * Keep track of the singleton.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static Implementation plugin;

	/**
	 * Create the instance.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public WarmachineRosterEditorPlugin() {
		super
			(new ResourceLocator [] {
				WarmachineSystemEditPlugin.INSTANCE,
			});
	}

	/**
	 * Returns the singleton instance of the Eclipse plugin.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the singleton instance.
	 * @generated
	 */
	@Override
	public ResourceLocator getPluginResourceLocator() {
		return plugin;
	}
	
	/**
	 * Returns the singleton instance of the Eclipse plugin.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the singleton instance.
	 * @generated
	 */
	public static Implementation getPlugin() {
		return plugin;
	}
	
	/**
	 * Logs an Error message with an exception.  To print errors to console,
	 * run eclipse with the -console -consolelog arguments
	 * 
	 * @generated NOT
	 * 
	 */
	public static synchronized void logError(String message, Throwable ex) {
		if (message == null){
			message = ""; //$NON-NLS-1$
		}
		Status errorStatus = new Status(IStatus.ERROR, PLUGIN_ID, message, ex);
		WarmachineRosterEditorPlugin.getPlugin().getLog().log(errorStatus);
	}
	
    /**
	 * Logs an Error message.  To print errors to console,
	 * run eclipse with the -console -consolelog arguments
	 * @generated NOT
	 */
	public static synchronized void logError(String message) {
		logError(message,null);
	}	
	
	/**
	 * The actual implementation of the Eclipse <b>Plugin</b>.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static class Implementation extends EclipseUIPlugin {
		/**
		 * Creates an instance.
		 * <!-- begin-user-doc -->
		 * <!-- end-user-doc -->
		 * @generated
		 */
		public Implementation() {
			super();
	
			// Remember the static instance.
			//
			plugin = this;
		}
	}

}
